package com.bdjk.bdmw.InfoGath.communication.protocol;

/**
 * @author Administrator
 *
 */
public abstract class BaseProtocol<T> {
	
	
	public boolean isResponse = true;
	  public boolean isSave = true;
	  public String pattern;
	  public String monitor;
	  public String centerNumber;
	  public String sos;
	  public String sosAll;
	  public String whiteList;
	  public String smsShutdown;
	  public String off;
	  public String reset;
	  public String terIdent;
	
	/**
	 * 对明文进行编码
	 * 
	 * @param msg
	 * @return
	 */
	public abstract String encodeMessage(T model);

	/**
	 * 对协议解码
	 * 
	 * @param msg
	 * @return
	 */
	public abstract T decodeMessage(String message);
	
	
	
}